﻿
/* 
 * Since 2008 - 2012
 */
package com.hh.bss.customer.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.customer.dao.*;
import com.hh.bss.customer.entity.*;
import com.hh.bss.customer.service.*;
import com.hh.bss.customer.vo.query.*;
import com.hh.bss.util.*;





public class CustomerComplain extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "CustomerComplain";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CUST_ID = "custId";
	public static final String ALIAS_COMPLAIN_DT = "complainDt";
	public static final String ALIAS_COMPLAINER = "complainer";
	public static final String ALIAS_BE_COMPLAINER = "beComplainer";
	public static final String ALIAS_HANDLER = "handler";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_CREATE_DT = "createDt";
	public static final String ALIAS_COMPLAIN_DETAIL = "complainDetail";
	public static final String ALIAS_HANDLE_RECORD = "handleRecord";
	public static final String ALIAS_HANDLE_STATUS = "handleStatus";
	public static final String ALIAS_MODIFIER = "modifier";
	public static final String ALIAS_MODIFIED_DT = "modifiedDt";
	
	//date formats
	public static final String FORMAT_COMPLAIN_DT = DATE_TIME_FORMAT;
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	//yyyy-MM-dd HH:mm:ss
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	
	private java.lang.Integer custId;
	
	private java.util.Date complainDt;
	@NotNull 
	private java.lang.Integer complainer;
	@NotBlank @Length(max=30)
	private java.lang.String beComplainer;
	@Length(max=30)
	private java.lang.String handler;
	@Length(max=30)
	private java.lang.String creator;
	
	private java.util.Date createDt;
	@Length(max=65535)
	private java.lang.String complainDetail;
	@Length(max=65535)
	private java.lang.String handleRecord;
	
	private java.lang.Integer handleStatus;
	
	@Length(max=50)
	private String modifier;
	
	private Date modifiedDt;
	//columns END

	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	public Date getModifiedDt() {
		return modifiedDt;
	}

	public void setModifiedDt(Date modifiedDt) {
		this.modifiedDt = modifiedDt;
	}

	public String getModifiedDtString() {
		return DateConvertUtils.format(getModifiedDt(), FORMAT_COMPLAIN_DT);
	}
	public void setModifiedDtString(String value) {
		setModifiedDt(DateConvertUtils.parse(value, FORMAT_COMPLAIN_DT,java.util.Date.class));
	}
	public CustomerComplain(){
	}

	public CustomerComplain(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setCustId(java.lang.Integer value) {
		this.custId = value;
	}
	
	public java.lang.Integer getCustId() {
		return this.custId;
	}
	public String getComplainDtString() {
		return DateConvertUtils.format(getComplainDt(), FORMAT_COMPLAIN_DT);
	}
	public void setComplainDtString(String value) {
		setComplainDt(DateConvertUtils.parse(value, FORMAT_COMPLAIN_DT,java.util.Date.class));
	}
	
	public void setComplainDt(java.util.Date value) {
		this.complainDt = value;
	}
	
	public java.util.Date getComplainDt() {
		return this.complainDt;
	}
	public void setComplainer(java.lang.Integer value) {
		this.complainer = value;
	}
	
	public java.lang.Integer getComplainer() {
		return this.complainer;
	}
	public void setBeComplainer(java.lang.String value) {
		this.beComplainer = value;
	}
	
	public java.lang.String getBeComplainer() {
		return this.beComplainer;
	}
	public void setHandler(java.lang.String value) {
		this.handler = value;
	}
	
	public java.lang.String getHandler() {
		return this.handler;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}
	public void setComplainDetail(java.lang.String value) {
		this.complainDetail = value;
	}
	
	public java.lang.String getComplainDetail() {
		return this.complainDetail;
	}
	public void setHandleRecord(java.lang.String value) {
		this.handleRecord = value;
	}
	
	public java.lang.String getHandleRecord() {
		return this.handleRecord;
	}
	public void setHandleStatus(java.lang.Integer value) {
		this.handleStatus = value;
	}
	
	public java.lang.Integer getHandleStatus() {
		return this.handleStatus;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("CustId",getCustId())
			.append("ComplainDt",getComplainDt())
			.append("Complainer",getComplainer())
			.append("BeComplainer",getBeComplainer())
			.append("Handler",getHandler())
			.append("Creator",getCreator())
			.append("CreateDt",getCreateDt())
			.append("ComplainDetail",getComplainDetail())
			.append("HandleRecord",getHandleRecord())
			.append("HandleStatus",getHandleStatus())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof CustomerComplain == false) return false;
		if(this == obj) return true;
		CustomerComplain other = (CustomerComplain)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

